package com.danskin.wechat.service;

import java.util.List;
import java.util.Map;

import com.alibaba.fastjson.JSONArray;
import com.danskin.wechat.entity.ActivityApply;
import com.danskin.wechat.entity.CustActivityApply;
import com.danskin.wechat.util.Page;

public interface CustActivityApplyService {

	boolean insertCustActivityApply(String activityId, String openId, JSONArray dataLsit);

	List<Integer> queryCustActivityApplyController(Integer id, String activityId);

	List<CustActivityApply> findCustActivityApplyId(Integer id);
	
	//根据活动id查询   报名该活动下报名人数
    Map<String,Integer> selectActivityCountByActivityId(Map<String,Object> map);
    
    //根据openId和活动id   判断是否参加此活动
    int selectApplyCountByActivityIdAndOpenId(Integer id,String openId);
    
    
	/**
	 * 查询我的活动列表
	 */
	List<Map<String,Object>> listPageMyActivityListByOpenId(Page page);
	/**
	 * 查询我的活动总数
	 */
	List<Map<String,Object>> selectMyActivityListByOpenId(Map<String,Object> map);

	/**
	 * 查询活动配置选项
	 */
	List<ActivityApply> selectActivityApplyOptionByActivityId(Integer id);
	/**
	 * 查询会员活动选项
	 */
	List<CustActivityApply> selectCustActivityApplyOptionByActivityId(Integer id,String openId);
	
	
	/**
	 *添加报名活动 
	 */
	int saveActivityApplySelective(CustActivityApply apply);
	
	List<Map<String,Object>> listPageActivityApplyStatic(Page page);
	
	int deleteCustActivityApplyByActivityId(Integer id);
	
	
}
